package com.bbva.kyfb.kyfbdtofo.entitys;

import org.springframework.stereotype.Component;

import com.bbva.kyfb.kyfbdtofo.RequestDto;
import com.bbva.kyfb.kyfbjpatlsb.dominiotlsb.Ttlsbeoo;
import com.bbva.kyfb.kyfbjpatlsb.dominiotlsb.TtlsbeooPK;

@Component
public class EooDTO /*extends Ttlsbeoo*/ {
	
	private Ttlsbeoo eooEntity;

	public EooDTO() {
		super();
	}

	public EooDTO(String codTipord, String codCampoord, String desCampoord, Character codSepa) {
		eooEntity = new Ttlsbeoo();
		eooEntity.setId(new TtlsbeooPK(codTipord, codCampoord));
		eooEntity.setDesCampoord(desCampoord);
		eooEntity.setCodSepa(codSepa);
	}

	public static Ttlsbeoo parseFicheroRequestToTtlsbsfo(
			RequestDto aFicheroRequest) {
		Ttlsbeoo ttlsbeoo = new Ttlsbeoo();
		TtlsbeooPK ttlsbeooPK = new TtlsbeooPK(aFicheroRequest.getTipoOrden(),
				null);
		ttlsbeoo.setId(ttlsbeooPK);

		return ttlsbeoo;
	}

	public Ttlsbeoo getEooEntity() {
		return eooEntity;
	}

	public void setEooEntity(Ttlsbeoo eooEntity) {
		this.eooEntity = eooEntity;
	}

	public TtlsbeooPK getId() {
		return getEooEntity().getId();
	}

	public String getDesCampoord() {
		return getEooEntity().getDesCampoord();
	}

}
